package com.melody.entry;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 用户信息表
 * @TableName user_info
 */
@TableName(value ="user_info")
@Data
public class UserInfo implements Serializable {
    /**
     * 用户id
     */
    @TableId(value = "user_id")
    private Integer userId;

    /**
     * 用户类型，0:管理员,1:普通用户
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 头像
     */
    @TableField(value = "user_img")
    private String userImg;

    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 电话号码
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 邮箱地址
     */
    @TableField(value = "mail")
    private String mail;

    /**
     * 用户地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 用户个性签名
     */
    @TableField(value = "signature")
    private String signature;

    /**
     * 0:未知,1:男,2:女
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 用户生日
     */
    @TableField(value = "birthday")
    private LocalDate birthday;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标记，0:未删除,1:已删除
     */
    @TableLogic
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}